﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.Entity;
using COM.OA.BLL;

public partial class qs_wenjian_liebiexiu : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) 
        {
            string id=this.Request.QueryString["ftype_id"];
            int fid = Int32.Parse(id);

            if (fid == 1)
            {
                this.Response.Write(string.Format(GetRedirect.WINALERT, "其他类别为默认类不能修改"));
                this.Response.Write(string.Format(GetRedirect.REDIRECT, "liebieguanli.aspx"));

            }
            else { 
            filetype ft = filetypeBLL.Select(fid);
            this.txtLeiBeiName.Text=ft.ftype_filetype;
        }

        }
        

    }
    protected void btXiu_Click(object sender, EventArgs e)
    {
        string name=this.txtLeiBeiName.Text;
        string id = this.Request.QueryString["ftype_id"];
        int fid = Int32.Parse(id);
        

        filetype ft = filetypeBLL.Select(fid);


        filetype ff = new filetype();
        ff.ftype_id = ft.ftype_id;
        ff.ftype_filetype = name;

        filetypeBLL.Update(ff);
        this.Response.Write(string.Format(GetRedirect.WINALERT, "修改成功"));
        this.Response.Write(string.Format(GetRedirect.REDIRECT, "liebieguanli.aspx"));
       
    }
}
